.PHONY: all
all: preview

ANT_LIB=${MRL_PROJ}/external/AntTweakBar/lib
LFLAGS1=-Wl,-Bdynamic ${ANT_LIB}/libAntTweakBar.so
LFLAGS2=-Wl,-rpath,${ANT_LIB}

.PHONY: shared
shared:
	cd ../shared && make

preview: shared main.o ../shared/Preview3D.o
	g++ main.o ../shared/Preview3D.o -o preview ${LFLAGS1} -lglut -lGLU -lGL ${LFLAGS2}

main.o: main.cpp ../shared/Preview3D.h 
	g++ -c main.cpp -o main.o -I../shared -I${MRL_PROJ}/external/AntTweakBar/include

.PHONY: clean
clean:
	cd ../shared && make clean
	-rm main.o preview
